package service.impl;

import java.util.List;

import pojo.Merchant;
import service.MerchantManager;
import dao.MerchantDao;
import dao.factory.DaoFactory;

public class MerchantManagerImpl implements MerchantManager {
	
	private MerchantDao warehouseDao;
	
	public MerchantManagerImpl(){
		warehouseDao = DaoFactory.getMerchantDaoInstance();
	}
	
	@Override
	public List<Merchant> getAllWarehouses() {
		return warehouseDao.findAll();
	}

	@Override
	public Merchant getWarehouse(String id) {
		return warehouseDao.load(id);
	}

}
